07. Lifecycle: Open and Close

L4 12 Create Active Lifecycle Diagram HS

Get the editable Activity Lifecycle worksheet pdf HERE.

You can print or fill out this diagram with notes as you go through the lesson. This will let you jot down the most important take aways as you explore the Activity lifecycle.

Try it: Open and press the back button

QUIZ QUESTION::

Open your activity and then navigate out of the activity by pressing the back button. Which callbacks are called and in what order?

ANSWER CHOICES:



State

Method

Opening activity state 1:

Opening activity state 2:

Opening activity state 3:

Closing activity state 1:

Closing activity state 2:

Closing activity state 3:

SOLUTION:

State

Method

Closing activity state 3:

Closing activity state 2:

Closing activity state 1:

Opening activity state 1:

Opening activity state 2:

Opening activity state 3:

ANDK L4 14 Open Back Button OnCreate

Garbage collection is a standard term in computer science. You can learn more about the basics of garbage collection here.